﻿using System;

namespace AbstractBugTracker
{
    public interface IBug
    {
        Uri Uri { get; }

        void AddComment(string body, bool isJson);
        long ReportCount { get; set; }
        Version EarliestBuild { get; set; }
        Version LatestBuild { get; set; }
        BugState State { get; }
        string Key { get; }
        void Close();
        void Reopen();
        
        /// <summary>
        /// Returns the minimum date if the issue isn't resolved
        /// </summary>
        DateTime ResolvedDateUtc { get; }

        Version BuildFixedOn { get; }
        string AutomaticEmail { get; }

        /// <summary>
        /// For issue tracker integrations that support it, the changes made to the IBug should be stored up if possible, so that
        /// they can be committed in one operation by this call
        /// </summary>
        void CommitChanges();
    }
}
